﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace JmShared
{
    /// <summary>
    /// Holds user settings specific to a pc client.
    /// </summary>

    public class PcUserSettings : UserSettings
    {
        [UserSettingsType(UserSettingsType.PcSettings)]
        public bool? GroupMessages { get; set; }

        [UserSettingsType(UserSettingsType.PcSettings)]
        public bool? EnableChatLog { get; set; }

        [UserSettingsType(UserSettingsType.PcSettings)]
        public bool? EnableWinampNowPlaying { get; set; }

        [UserSettingsType(UserSettingsType.PcSettings)]
        public bool? EnableSpotifyNowPlaying { get; set; }

        [UserSettingsType(UserSettingsType.PcSettings)]
        public string WinampKeyGesture { get; set; }

        [UserSettingsType(UserSettingsType.PcSettings)]
        public string SpotifyKeyGesture { get; set; }

        [UserSettingsType(UserSettingsType.PcSettings)]
        public string NowPlayingFormat { get; set; }

        [UserSettingsType(UserSettingsType.PcSettings)]
        public List<string> ExpandedGroups { get; set; }

        [UserSettingsType(UserSettingsType.PcSettings)]
        public bool? PauseEmoticonsOnFocusLoss { get; set; }


        public PcUserSettings(bool setDefaults = false)
        {
            if (setDefaults)
            {
                this.BlockedGroups = new List<string>();
                this.GroupMessages = true;
                this.EnableChatLog = true;
                this.FontFamily = "Microsoft Sans Serif";
                this.FontStyle = "Normal";
                this.FontWeight = "Normal";
                this.FontSize = 12;
                this.FontHexColor = "#000000";
                this.EnableWinampNowPlaying = true;
                this.EnableSpotifyNowPlaying = true;
                this.WinampKeyGesture = "Ctrl+D1";
                this.SpotifyKeyGesture = "Ctrl+D2";
                this.CustomEmoticons = new HashSet<ContactEmoticon>();
                this.OpenChats = new List<OpenChat>();
                this.EnableNudge = false;
                this.ShowTimestamp = true;
                this.StoreMessagesWhileOffline = true;
                this.OfflineMessagesCountLimit = 150;
                this.OfflineMessagesAgeLimit = 12;
                this.ReceiveAnsweredMessagesWhileOffline = true;
                this.NowPlayingFormat = "No rocka ej til {artist} - {title} ({status})!!";
                this.AnimateGifEmoticons = true;
                this.PauseEmoticonsOnFocusLoss = false;
            }
        }
        public PcUserSettings() { }


    }
}
